package com.kws.merchant.domain;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 收货地址管理(ShippingAddress)表实体类
 *
 * @author yxy
 * @since 2024-10-22 14:57:55
 */
@Data
@ApiModel("收货地址管理")
@TableName(value = "tb_shipping_address")
public class ShippingAddress extends Model<ShippingAddress> implements Serializable {
    private static final long serialVersionUID = -77654114197603333L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("收货地址ID")
    private Long id;

    @ApiModelProperty("收货人电话")
    @NotBlank(message = "收货人电话不能为空 ")
    private String consigneePhone;

    @ApiModelProperty("收货人")
    @NotBlank(message = "收货人不能为空 ")
    private String consignee;

    @ApiModelProperty("收货人地址")
    @NotBlank(message = "收货人地址不能为空 ")
    private String addr;

    @ApiModelProperty("详细地址")
    @NotBlank(message = "详细地址不能为空 ")
    private String addressInfo;

    @ApiModelProperty("地址别名")
    private String addressAlias;

    @ApiModelProperty("是否为默认地址(0默认 1非默认)")
    @NotNull(message = "是否为默认地址不能为空 ")
    private Integer isDefault;

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("地址标签")
    private String addrLabel;

    @ApiModelProperty("可用状态：0-不可用，1-可用")
    private String enable;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    @ApiModelProperty("修改时间")
    private Date updateTime;
}
